<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="穷在闹市" />
    <!-- 作者 -->
    <meta name="revised" content="穷在闹市.v3, 2019/05/01" />
    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介" />
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />
    <title>穷在闹市出品</title>

    <!-- 公共样式 开始 -->
    <link rel="stylesheet" type="text/css" href="/admin/css/base.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/iconfont.css">
    <script type="text/javascript" src="/admin/framework/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/admin/layui/css/layui.css">
    <script type="text/javascript" src="/admin/layui/layui.js"></script>
    <!-- 滚动条插件 -->
    <link rel="stylesheet" type="text/css" href="/admin/css/jquery.mCustomScrollbar.css">
    <script src="/admin/framework/jquery-ui-1.10.4.min.js"></script>
    <script src="/admin/framework/jquery.mousewheel.min.js"></script>
    <script src="/admin/framework/jquery.mCustomScrollbar.min.js"></script>
    <script src="/admin/framework/cframe.js"></script><!-- 仅供所有子页面使用 -->
    <!-- 公共样式 结束 -->


</head>

<body>
<div class="cBody">
    <form class="layui-form" action="">
        <div class="layui-form-item">
            <div class="layui-input-inline">
                <input type="text" name="name" required lay-verify="required" placeholder="输入分管名称" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" id="time" placeholder=" - ">
            </div>
            <button class="layui-btn" lay-submit lay-filter="formDemo">检索</button>
            <button><a href="/useradd_admin" class="layui-btn">添加</a></button>
        </div>
    </form>
    <form class="layui-form" action="">

        <table id="customList" class="layui-table">
            <thead>
            <tr>
                <th>分管名称</th>
                <th>所属区域</th>
                <th>负责人</th>
                <th>联系方式</th>
                <th>传真</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>龙九山</td>
                <td>无锡市</td>
                <td>龙九山</td>
                <td>18600001111</td>
                <td>028-6666666</td>
                <td>123456789@qq.com</td>
                <td>
                    <a class="layui-btn layui-btn-xs" onclick="delCustomList(this)">删除</a>
                </td>
            </tr>
            <tr>
                <td>龙九山</td>
                <td>无锡市</td>
                <td>龙九山</td>
                <td>18600001111</td>
                <td>028-6666666</td>
                <td>123456789@qq.com</td>
                <td>
                    <a class="layui-btn layui-btn-xs" onclick="delCustomList(this)">删除</a>
                </td>
            </tr>

            </tbody>
        </table>
    </form>

    <!-- layUI 分页模块 -->
    <div id="pages"></div>
    <script>
        layui.use(['laypage', 'layer'], function() {
            var laypage = layui.laypage,
                layer = layui.layer;

            //总页数大于页码总数
            laypage.render({
                elem: 'pages'
                ,count: 100
                ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
                ,jump: function(obj){
                    console.log(obj)
                }
            });
        });
    </script>
</div>
<script>
    //根据2018.03.01日 张家港客户需求改版的要求，在新的后台框架中提供以下功能
    //此功能只适用与提前加载后，进行搜索；

    //新增
    function addCustomList(id){
        var str = '<tr>'+
            '<td>'+
            '<select class="newSelectSearch" name="modules" lay-verify="required" lay-search="" lay-filter="selectFilter">'+
            '<option value="">直接选择或搜索选择</option>'+
            '</select>'+
            '</td>'+
            '<td>'+
            '<input type="tel" name="phone" lay-verify="required" autocomplete="off" class="layui-input">'+
            '</td>'+
            '<td>'+
            '<input type="tel" name="phone" lay-verify="required" autocomplete="off" class="layui-input">'+
            '</td>'+
            '<td>'+
            '<input type="tel" name="phone" lay-verify="required" autocomplete="off" class="layui-input">'+
            '</td>'+
            '<td>'+
            '<input type="tel" name="phone" lay-verify="required" autocomplete="off" class="layui-input">'+
            '</td>'+
            '<td>'+
            '<input type="tel" name="phone" lay-verify="required" autocomplete="off" class="layui-input">'+
            '</td>'+
            '<td>'+
            '<a class="layui-btn layui-btn-xs" onclick="delCustomList(this)">删除</a>'+
            '</td>'+
            '</tr>';
        $("#"+id).append(str);

        layui.use(['form','laydate'], function() {
            var form = layui.form;
            form.render();
        });
        //重新初始化Iframe的高度
        cframeInit();
    }

    //删除
    function delCustomList(_this){
        layui.use(['form','laydate'], function() {
            layer.confirm('确定要删除么？', {
                btn: ['确定', '取消'] //按钮
            }, function() {
                $(_this).parent().parent().remove();
                layer.msg('删除成功', {
                    icon: 1
                });
            }, function() {
                layer.msg('取消删除', {
                    time: 2000 //20s后自动关闭
                });
            });
        });
    }

</script>
</body>

</html>
